package com.jihu.design.behavioral.mediator;

/**
 * @author jihu
 * @date 2021/9/28
 */
public class XC9527 extends Captain {

    ControlTower controlTower;

    public XC9527 setControlTower(ControlTower controlTower) {
        this.controlTower = controlTower;
        return this;
    }

    @Override
    void fly() {
        System.out.println("XC9527请求起飞......");
        //问每个机长能否起飞
        controlTower.acceptRequest(this,"fly");

    }

    @Override
    void land() {
        System.out.println("XC9527请求降落......");
        controlTower.acceptRequest(this,"land");
    }

    @Override
    void success() {
        System.out.println("XC9527完成......");
        controlTower.acceptRequest(this,"success");

    }
}
